<!--
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Employee List</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 8px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
    </style>
</head>
<body>

<h2>Employee List</h2>
<table id="employeeTable">
    <thead>
    <tr>
        <th>ID</th>
        <th>Name</th>
        <th>Department</th>
    </tr>
    </thead >
    <tbody id="tbody">
    &lt;!&ndash; 数据将通过 JavaScript 动态添加 &ndash;&gt;
    </tbody>
</table>
<script>
    $(document).ready(function () {
        $.getJSON("/show", function (data) {
            $.each(data, function (i, emp) {
                var row = '<tr>';
                row += '<td>' + emp.empno + '</td>';
                row += '<td>' + emp.ename + '</td>';
                row += '<td>' + emp.dept.deptno + '</td>';
                row += '</tr>';
                $('#tbody').append(row);
            });
        });
    });


</script>

</body>
</html>-->
